//
//  ViewController.m
//  Interesting
//
//  Created by point on 2018/2/8.
//  Copyright © 2018年 whiteboard. All rights reserved.
//


#import "ViewController.h"
#import <Masonry.h>
#import "MASConstraint+SS.h"
#import "MASConstraintMaker+SS.h"
#import "SonMASConstraintMaker.h"

#define FIT_LENGTH(x)  x * ScreenWidth / 375.f
#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#define SCGSizeMake(w,h) CGSizeMake(FIT_LENGTH(w), FIT_LENGTH(h));

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UILabel *view= [[UILabel alloc]init];
    [self.view addSubview:view];
    //字体测试
    view.font = [UIFont systemFontOfSize:100];
    
    //offset测试
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(self.view).sOffset(10);
        make.bottom.mas_equalTo(self.view).sOffset(-10);
        make.left.mas_equalTo(self.view).sOffset(100);
        make.right.mas_equalTo(self.view).offset(100);
    }];
    view.backgroundColor = [UIColor redColor];
    
    
    UILabel *view3= [[UILabel alloc]init];
    [self.view addSubview:view3];
    [view3 mas_makeConstraints:^(MASConstraintMaker *make) {
        //make.edges.equalTo(self.view).insets(UIEdgeInsetsMake(100, 100, 100, 100));
        make.edges.equalTo(self.view).sInsets(UIEdgeInsetsMake(100, 100, 100, 100));
    }];
    view3.backgroundColor = [UIColor yellowColor];
    
    
    //测试center mas_equalTo
    UILabel *view2= [[UILabel alloc]init];
    [self.view addSubview:view2];
    [view2 mas_makeConstraints:^(MASConstraintMaker *make) {
         make.center.equalTo(self.view);
        
      // make.mas_sequalTo(CGSizeMake(300, 300));
         //[make setSSize:CGSizeMake(300, 300)];
         //make.sSize = CGSizeMake(300, 300);
        // make.ssSize(CGSizeMake(300, 300));

        //make.edges.mas_equalTo(self.view).
        
        //make.mas_sequalTo(@100);
        //make.size.mas_equalTo
         // make.size.mas_equalTo(CGSizeMake(300, 300));
      //  make.sSize = CGSizeMake(300, 300);
        //make.ssSize(CGSizeMake(300, 300));
        // [make ssizeMake:CGSizeMake(300, 300)];
        //make.pushFrame = CGRectMake(0, 0, 0, 0);

        // make.size.equalTo(self.view).sizeOffset(CGSizeMake(-100, -100));

        //   CGSize a = SCGSizeMake(300, 300)
        //  NSLog(@"%f - %f",a.width,a.height);
        //make.width.mas_equalTo
    }];
    view2.backgroundColor = [UIColor blueColor];
    
    
    
    
   
    
    
    
}





@end
